{% extends "index.html" %}

{% block content %}
          {% for page in pages %}
            <div class="page_list">
              {% if view_all %}
                <h2 class="page_title"><a href="/view/{{ page.url_slug }}">{{ page.title|striptags|truncatewords_html:10 }}</a></h1>
              {% else %}
                {% if page.usermayedit %}
                  <h2 class="page_title"><a href="/edit/{{ page.url_slug }}">{{ page.title|striptags  }}</a></h1>
                {% else %}
                  <h2 class="page_title">{{ page.title|striptags  }}</h1>
                {% endif %}
              {% endif %}
              <div class="page_list_content">
                <p class="small">
                  {{ page.author.nick }}
                  -
                  {{ page.date|date:"d.M.Y" }} {{ page.date|time:"H:i" }}
                </p>
                <p>
                {% if view_all %}
                  {{ page.text|removetags:badhtmltags|removetags:semibadhtmltags|truncatewords_html:50 }}
                {% else %}
                  {{ page.text|removetags:badhtmltags }}
                {% endif %}
                </p>
              </div>
            </div>
          {% endfor %}
{% endblock content %}